<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:body>
	<ui:composition template="/template/common/commonLayout.xhtml">

		<ui:define name="content">


			<h:panelGrid>
								
				<p:dataTable id="table" var="timeTableElement"
					value="#{myTicketsTableBean.tteTableDataModel}"
					style="width: 100%" scrollHeight="300"
					scrollable="true">
					
				<p:column headerText="Train">  
                   #{timeTableElement.train.number}  
               </p:column>

	           <p:column headerText="Departure station">  
                   #{timeTableElement.departureStation.name}  
               </p:column>
               
               <p:column headerText="Departure Date">
						<h:outputText value="#{timeTableElement.departureTime}">
							<f:convertDateTime pattern="dd.MM.yyyy HH:mm" />
						</h:outputText>
			  </p:column>
               
               
				<p:column headerText="Arrival station">  
                   #{timeTableElement.arrivalStation.name}  
               </p:column>

				<p:column headerText="Arrival Date">
						<h:outputText value="#{timeTableElement.arrivalTime}">
							<f:convertDateTime pattern="dd.MM.yyyy HH:mm" />
						</h:outputText>
				</p:column>

			
				</p:dataTable>
			</h:panelGrid>


		</ui:define>

		


	</ui:composition>

</h:body>
</html>